package edu.jimei.projecttachy.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import edu.jimei.projecttachy.service.DataScreenService;

import java.util.Collections;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/api/screen")
public class DataScreenController {

    private final DataScreenService dataScreenService;

    public DataScreenController(DataScreenService dataScreenService) {
        this.dataScreenService = dataScreenService;
    }

    @GetMapping("/main")
    public List<Map<String, Object>> getMainScreenData() {
        return dataScreenService.getMainScreenData();
    }
} 